﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Serialization;

namespace WordStat
{
    internal sealed class FileContainer
    {
        public void LoadData(string dir)
        {
            try
            {
                if (!Directory.Exists(dir))
                {
                    Directory.CreateDirectory(dir);

                }

                var fileName = Path.Combine(dir, FILE_CONFIG);

                if(File.Exists(fileName))
                {
                    LoadDataFromFile(fileName);
                }
                else
                {
                    
                }
            }
            catch (Exception e)
            {
                System.Windows.MessageBox.Show(e.ToString());
            }
        }

        private void LoadDataFromFile(string fileName)
        {
            //var formatter = new XmlSerializer();
        }

        private void LoadTasks(string fileName)
        {
            
        }

        private List<string> _files;

        private const string FILE_CONFIG = "files_config.xml";
    }
}